<template>
  <div class="header">
    <!-- 版心 -->
    <div class="wrap headerwrap">
      <div class="logo">
        <img src="../assets/img/indexLogo.6f8ac4f0.png" alt="" />
      </div>
      <ul class="navs">
        <li @click="$router.push('/home')" :class="{curr:$route.path=='/home'}">首页</li>
        <li @click="$router.push('/goods')" :class="{curr:$route.path=='/goods'}">全部商品</li>
        <li @click="$router.push('/user')" :class="{curr:$route.path=='/user'}">个人中心</li>
        <li @click="$router.push('/order')" :class="{curr:$route.path=='/order'}">我的订单</li>
        <li @click="$router.push('/free')" :class="{curr:$route.path=='/free'}">专属福利</li>
      </ul>
      <div class="search">
        <input type="text" placeholder="请输入关键字" />
        <span>
          <img src="../assets/img/search.png" alt="" />
        </span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
};
</script>
 
<style lang = "less" scoped>
.header {
  margin-top: 14px;
  .headerwrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-family: SourceHanSansSC;
    font-weight: 500;
    .navs {
      display: flex;
      justify-content: space-between;
      width: 500px;
      cursor: pointer;
      .curr {
        color: #0a328e;
      }
    }
    .search {
      display: flex;
      input {
        width: 214px;
        height: 40px;
        border: 1px solid #dedede;
        border-radius: 20px 0px 0px 20px;
        box-sizing: border-box;
        text-indent: 1em;
      }
      span {
        width: 50px;
        height: 40px;
        line-height: 40px;
        text-align: center;
        background: #0a328e;
        border-radius: 0px 20px 20px 0px;
      }
    }
  }
}
</style>